profiler: Add G_GNUC_PRINTF markers to silence warnings
authorAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 12:35:42 +0000 (13:35 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 12:36:04 +0000 (13:36 +0100)
I was getting CI failures like:
 ../gdk/gdkprofiler.c: In function ‘add_markvf’:
../gdk/gdkprofiler.c:111:3: error: function ‘add_markvf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]

gdk/gdkprofiler.c

index 4d122b7b910b31f4de704fbccf98f3e54b9ad2de..4617d9a7e3c9a63ad55fa210ff6b907d9dd50367 100644 (file)
@@ -100,6 +100,12 @@ gdk_profiler_add_mark (gint64      start,
                                    "gtk", name, message);
 }
 
+static void add_markvf (gint64      start,
+                        guint64     duration,
+                        const char *name,
+                        const char *format,
+                        va_list      args) G_GNUC_PRINTF(4, 0);
+
 static void
 add_markvf (gint64      start,
             guint64     duration,